<?php
namespace Zhub\HttpMessage;


use Zhub\HttpMessage\Headers\ResponseHeader;

class Response extends Message
{
	const STATUS = 'status';


	public function getStatus():int
	{
		return $this->get(self::STATUS);
	}

	public function setStatus(int $status)
	{
		$this->set(self::STATUS, $status);
	}

    public function getHeader():ResponseHeader
    {
        return $this->get(self::HEADER);
    }

    public function setHeader(ResponseHeader $headers = null)
    {
        $this->set(self::HEADER, $headers);
    }

	public static function initialize():array
	{
        return array_merge(parent::initialize(), [
            self::STATUS => ResponseStatus::HTTP_OK,
            self::HEADER => function () {return ResponseHeader::class;}
        ]);
	}

}
